package cxt.cn;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @Auther: ChengXiaotian
 * @Date: 2020-06-10 09:03
 * @Description:
 */
@EnableDiscoveryClient
@SpringBootApplication
public class ConsumerconsulApplication {
    public static void main(String[] args) {
        SpringApplication.run(ConsumerconsulApplication.class);
    }
    @Bean
    @LoadBalanced
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
